#include <jni.h>
#include <string>
#include <android/log.h>

#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, "deyiNDK", __VA_ARGS__))

char RESULT_OK[] = "ok";

jstring logEToJstring(JNIEnv* pEnv, const char* msg)
{
    LOGE("%s",msg);
    return pEnv->NewStringUTF(msg);
}

extern "C" JNIEXPORT jstring JNICALL
Java_com_hyg_ndkapplication_NativeLib_stringFromJNI(
        JNIEnv* env,
        jobject /* this */) {
    std::string hello = "Hello from C++";
    return env->NewStringUTF(hello.c_str());
}
